<!DOCTYPE html>

<html lang="zh" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>

<body class="gray-bg" id="test">
<div class="wrapper wrapper-content">
    <div class="col-sm-12">
        <div class="row">
            <div class="col-sm-6">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>基本信息</h5>
                        <div class="ibox-tools">
                            <a class="collapse-link"><i class="fa fa-chevron-up"></i>
                            </a>

                        </div>
                    </div>
                    <div class="ibox-content">


                        <input type="hidden" th:value="${merchant.realNameStatus}" id="realNameStatus" name="realNameStatus">

                        <input type="hidden" th:value="${merchant.id}" id="iD" name="id">
                        <table class="table table-hover no-margins">

                            <thead>
                            <tr>
                                <th>名称</th>
                                <th>值</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr>
                                <td>商户编号</td>
                                <td th:text="${merchant.merchantNo}"></td>
                            </tr>
                            <tr>
                                <td>商户名称</td>
                                <td th:text="${merchant.merchantCnName}"></td>
                            </tr>
                            <tr>
                                <td>身份证号</td>
                                <td th:text="${merchant.idCardNumber}"></td>
                            </tr>
                            <tr>
                                <td>联系电话</td>
                                <td th:text="${merchant.reservePhone}"></td>
                            </tr>
                            <tr>
                                <td>用户账号</td>
                                <td th:text="${merchant.phone}"></td>
                            </tr>


                            <tr>
                                <td>创建时间</td>

                                <td th:text="${#dates.format(merchant.createTime,'yyyy-MM-dd HH:mm:ss')}">
                                </td>
                            </tr>
                            <tr>
                                <td>开户银行</td>
                                <td th:text="${merchant.bankName}"></td>
                            </tr>
                            <tr>
                                <td>银行账号</td>
                                <td th:text="${merchant.bankAccount}"></td>
                            </tr>



                            </tbody>
                        </table>
                    </div>
                </div>

            </div>
            <div class="col-sm-6">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>资质信息</h5>


                        <div class="ibox-tools">
                            <a class="collapse-link"><i class="fa fa-chevron-up"></i></a>

                        </div>
                    </div>

                    <div class="ibox-content">
                        <table class="table table-hover no-margins">
                            <h5>以下证件为必填项</h5>
                            <thead th:each="merchantImage : ${merchantImage}">
                            <tr th:if="${merchantImage.type=='10E'}">
                                <td>法人身份证正面 (必填)</td>
                                <td><img src="../static/payment.png" width="100" height="100"
                                         onclick="showMaxImg(this)"    th:src="${merchantImage.imageUrl}" th:if="${merchantImage.type=='10E'}"></td>
                            </tr>
                            <tr th:if="${merchantImage.type=='10F'}">
                                <td>法人身份证反面(必填)</td>
                                <td><img src="../static/payment.png" width="100" height="100"
                                         th:src="${merchantImage.imageUrl}" th:if="${merchantImage.type=='10F'}"
                                         onclick="showMaxImg(this)"></td>
                            </tr>
                            <tr>
                                <td th:if="${merchantImage.type=='10K'}">银行卡正面(必填)</td>
                                <td><img src="../static/payment.png" width="100" height="100"
                                         onclick="showMaxImg(this)"     th:src="${merchantImage.imageUrl}" th:if="${merchantImage.type=='10K'}"></td>
                            </tr>
                            <tr th:if="${merchantImage.type=='10L'}">
                                <td>银行卡反面(必填)</td>
                                <td><img src="../static/payment.png" width="100" height="100"
                                         onclick="showMaxImg(this)"   th:src="${merchantImage.imageUrl}" th:if="${merchantImage.type=='10L'}"></td>
                            </tr>
                            <tr th:if="${merchantImage.type=='10M'}">
                                <td>商户手持身份证照(必填)</td>
                                <td><img src="../static/payment.png" width="100" height="100"
                                         onclick="showMaxImg(this)"   th:src="${merchantImage.imageUrl}" th:if="${merchantImage.type=='10M'}"></td>
                            </tr>
                            </thead>
                            <tbody>

                            </tbody>
                        </table>
                    </div>
                </div>


            </div>


        </div>




    </div>
</div>
</div>

<div class="modal fade bs-example-modal-lg text-center" id="imgModal" tabindex="-1" role="dialog" data-toggle="modal"
     aria-labelledby="myLargeModalLabel" aria-hidden="true">
    <div class="modal-dialog modal-lg" style="display:inline-block;width:auto;">
        <div class="modal-content">
            <div id="imgshow"></div>
        </div>
    </div>
</div>


</body>
<div th:include="include :: footer"></div>
<script th:inline="javascript">
    var datas = [[${@dict.getType('sys_freeze_status')}]];
    var datas1 = [[${@dict.getType('sys_withdraw_status')}]];
    var prefix = ctx + "system/merchant";

    //点击放大图片
    function showMaxImg(obj) {

        var src = $(obj).attr("src");
        $("#imgModal").find("#imgshow").html("<img src='" + src + "' class='carousel-inner img-responsive img-rounded' data-dismiss='modal'>");
        $("#imgModal").modal('show');
    }


    $(function () {
        $("#tdrealNameStatus").append($.table.selectDictLabel(datas, $("#realNameStatus").val()))
        $("#realNameStatus1").append($.table.selectDictLabel(datas, $("#realNameStatus1").val()))

    })
    $(".modal").appendTo("body"), $("[data-toggle=popover]").popover(), $(".collapse-link").click(function () {
        var div_ibox = $(this).closest("div.ibox"),
            e = $(this).find("i"),
            i = div_ibox.find("div.ibox-content");
        i.slideToggle(200),
            e.toggleClass("fa-chevron-up").toggleClass("fa-chevron-down"),
            div_ibox.toggleClass("").toggleClass("border-bottom"),
            setTimeout(function () {
                div_ibox.resize();
            }, 50);
    }), $(".close-link").click(function () {
        var div_ibox = $(this).closest("div.ibox");
        div_ibox.remove()
    });
</script>
</html>
